package com.it.commicity.common;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "用户不存在"),
    DATA_ERROR(204, "数据异常"),
    USER_LOGIN_MISMATCH(205, "请重新登录"),

    TOKEN_LOGIN_AUTH(305, "登录出错"),
    TOKEN_INVALID(602, "登录异常，请重新登录"),
    SMS_SEND_ERROR(603, "验证码发送失败"),
    CODE_PHONE_ERROR(604, "请输入正确的手机号"),
    SEND_SMS_TOO_OFTEN(605, "验证法发送过于频繁,五分钟后再试"),
    EXCEL_EXPORT_ERROR(606, "导出失败");
    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
